/**
 * 
 */
package org.gov.vis.data.gui;

import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.gov.vis.components.VISTextField;
import org.gov.vis.data.gui.listener.DistributionLNListener;
import org.gov.vis.data.gui.listener.ProcurementLNListener;
import org.gov.vis.gui.VisBaseDialog;
import org.gov.vis.gui.util.GuiUtil;
import org.gov.vis.util.DBConstants;

import com.toedter.calendar.JDateChooser;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author Vishwanath
 *
 */
public class ProcurementLNDialog extends VisBaseDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6102557880911490359L;
	private VISTextField txtFldDOReceipt;
	private JLabel lblKgs;
	private VISTextField txtFldLNKgs;
	private JLabel lblFromStation;
	private JLabel lblVehicalNo;
	private JButton btnReset;
	private JButton btnSave;
	private JPanel btnPLNPanel;
	private VISTextField txtFldLNEvoporationLoss;
	private JLabel lblEvoporation;
	private VISTextField txtFldLNVehicalNo;
	private VISTextField txtFldLNFromStation;
	private VISTextField txtFldLNConvertedLtrs;
	private JLabel lblConvertedLtrs;
	private VISTextField txtFldCode;
	private JLabel lblCode;
	private JPanel pnlMessages;
	private JLabel lblDateOfReceipt;
	private JPanel pnlPLNPanel;
	private JDateChooser dtChoDateOfReceipt;

	/**
	 * @param owner
	 * @param title
	 * @param modal
	 */
	public ProcurementLNDialog(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		// TODO Auto-generated constructor stub
		initGUI();
		GuiUtil.CompCenterCords cords=GuiUtil.getCompCenterCords(500, 450);
		setBounds(cords.getX(), cords.getY(), 500, 450);		
	}

	private void initGUI() {
		// TODO Auto-generated method stub
		GridBagLayout thisLayout = new GridBagLayout();
		thisLayout.rowWeights = new double[] {0.1};
		thisLayout.rowHeights = new int[] {7};
		thisLayout.columnWeights = new double[] {0.1};
		thisLayout.columnWidths = new int[] {7};
		getContentPane().setLayout(thisLayout);
		{
			pnlPLNPanel = new JPanel();
			GridBagLayout pnlPLNPanelLayout = new GridBagLayout();
			pnlPLNPanelLayout.columnWidths = new int[] {7, 7, 7, 7, 7};
			pnlPLNPanelLayout.rowHeights = new int[] {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
			pnlPLNPanelLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.1, 0.0};
			pnlPLNPanelLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
			getContentPane().add(pnlPLNPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			pnlPLNPanel.setLayout(pnlPLNPanelLayout);
			{
				lblDateOfReceipt = new JLabel();
				pnlPLNPanel.add(lblDateOfReceipt, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblDateOfReceipt.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_dtofrcpt"), true));
			}
			/*{
				txtFldDOReceipt = new VISTextField();
				pnlPLNPanel.add(txtFldDOReceipt, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}*/
			{
				lblKgs = new JLabel();
				pnlPLNPanel.add(lblKgs, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblKgs.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_kgs"), false));
			}
			{
				txtFldLNKgs = new VISTextField();
				pnlPLNPanel.add(txtFldLNKgs, new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
				txtFldLNKgs.addFocusListener(new ProcurementLNListener(this));
			}
			{
				dtChoDateOfReceipt = new JDateChooser(null,DBConstants.DISPLAY_DATE_FORMAT);
				dtChoDateOfReceipt.setPreferredSize(txtFldLNKgs.getPreferredSize());
				pnlPLNPanel.add(dtChoDateOfReceipt, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
		
			}
			{
				lblConvertedLtrs = new JLabel();
				pnlPLNPanel.add(lblConvertedLtrs, new GridBagConstraints(1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblConvertedLtrs.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_cvrtltrs"), false));
			}
			{
				txtFldLNConvertedLtrs = new VISTextField();
				pnlPLNPanel.add(txtFldLNConvertedLtrs, new GridBagConstraints(3, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
				txtFldLNConvertedLtrs.setEditable(false);
			}
			{
				lblFromStation = new JLabel();
				pnlPLNPanel.add(lblFromStation, new GridBagConstraints(1, 10, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblFromStation.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_frmstation"), true));
			}
			{
				txtFldLNFromStation = new VISTextField();
				pnlPLNPanel.add(txtFldLNFromStation, new GridBagConstraints(3, 10, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblVehicalNo = new JLabel();
				pnlPLNPanel.add(lblVehicalNo, new GridBagConstraints(1, 12, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblVehicalNo.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_vehicleno"), true));
			}
			{
				txtFldLNVehicalNo = new VISTextField();
				pnlPLNPanel.add(txtFldLNVehicalNo, new GridBagConstraints(3, 12, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblEvoporation = new JLabel();
				pnlPLNPanel.add(lblEvoporation, new GridBagConstraints(1, 14, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblEvoporation.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_evposs"), false));
			}
			{
				txtFldLNEvoporationLoss = new VISTextField();
				pnlPLNPanel.add(txtFldLNEvoporationLoss, new GridBagConstraints(3, 14, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				btnPLNPanel = new JPanel();
				pnlPLNPanel.add(btnPLNPanel, new GridBagConstraints(3, 16, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				{
					pnlMessages = new JPanel();
					GridBagLayout jPanel1Layout = new GridBagLayout();
					pnlPLNPanel.add(pnlMessages, new GridBagConstraints(1, 1, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
					jPanel1Layout.rowWeights = new double[] {0.1};
					jPanel1Layout.rowHeights = new int[] {7};
					jPanel1Layout.columnWeights = new double[] {0.1};
					jPanel1Layout.columnWidths = new int[] {7};
					pnlMessages.setLayout(jPanel1Layout);
				}
				{
					lblCode = new JLabel();
					pnlPLNPanel.add(lblCode, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblCode.setText(setFieldLabel(getResources().getString("dialog_label_prmt_ln_code"), true));
				}
				{
					txtFldCode = new VISTextField();
					pnlPLNPanel.add(txtFldCode, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					btnSave = new JButton();
					btnPLNPanel.add(btnSave);
					btnSave.setText(getResources().getString("dialog_button_save"));
					btnSave.addActionListener(new ProcurementLNListener(this));
				}
				{
					btnReset = new JButton();
					btnPLNPanel.add(btnReset);
					btnReset.setText(getResources().getString("dialog_button_reset"));
					btnReset.addActionListener(new ProcurementLNListener(this));
				}
			}
		}
		this.setSize(500, 450);
		
	}//end initGUI

	public JPanel getjPanel1() {
		return pnlMessages;
	}


	/**
	 * @return the txtFldDOReceipt
	 */
	public VISTextField getTxtFldDOReceipt() {
		return txtFldDOReceipt;
	}

	/**
	 * @param txtFldDOReceipt the txtFldDOReceipt to set
	 */
	public void setTxtFldDOReceipt(VISTextField txtFldDOReceipt) {
		this.txtFldDOReceipt = txtFldDOReceipt;
	}

	/**
	 * @return the lblKgs
	 */
	public JLabel getLblKgs() {
		return lblKgs;
	}

	/**
	 * @param lblKgs the lblKgs to set
	 */
	public void setLblKgs(JLabel lblKgs) {
		this.lblKgs = lblKgs;
	}

	/**
	 * @return the txtFldLNKgs
	 */
	public VISTextField getTxtFldLNKgs() {
		return txtFldLNKgs;
	}

	/**
	 * @param txtFldLNKgs the txtFldLNKgs to set
	 */
	public void setTxtFldLNKgs(VISTextField txtFldLNKgs) {
		this.txtFldLNKgs = txtFldLNKgs;
	}

	/**
	 * @return the lblFromStation
	 */
	public JLabel getLblFromStation() {
		return lblFromStation;
	}

	/**
	 * @param lblFromStation the lblFromStation to set
	 */
	public void setLblFromStation(JLabel lblFromStation) {
		this.lblFromStation = lblFromStation;
	}

	/**
	 * @return the lblVehicalNo
	 */
	public JLabel getLblVehicalNo() {
		return lblVehicalNo;
	}

	/**
	 * @param lblVehicalNo the lblVehicalNo to set
	 */
	public void setLblVehicalNo(JLabel lblVehicalNo) {
		this.lblVehicalNo = lblVehicalNo;
	}

	/**
	 * @return the btnReset
	 */
	public JButton getBtnReset() {
		return btnReset;
	}

	/**
	 * @param btnReset the btnReset to set
	 */
	public void setBtnReset(JButton btnReset) {
		this.btnReset = btnReset;
	}

	/**
	 * @return the btnSave
	 */
	public JButton getBtnSave() {
		return btnSave;
	}

	/**
	 * @param btnSave the btnSave to set
	 */
	public void setBtnSave(JButton btnSave) {
		this.btnSave = btnSave;
	}

	/**
	 * @return the btnPLNPanel
	 */
	public JPanel getBtnPLNPanel() {
		return btnPLNPanel;
	}

	/**
	 * @param btnPLNPanel the btnPLNPanel to set
	 */
	public void setBtnPLNPanel(JPanel btnPLNPanel) {
		this.btnPLNPanel = btnPLNPanel;
	}

	/**
	 * @return the txtFldLNEvoporationLoss
	 */
	public VISTextField getTxtFldLNEvoporationLoss() {
		return txtFldLNEvoporationLoss;
	}

	/**
	 * @param txtFldLNEvoporationLoss the txtFldLNEvoporationLoss to set
	 */
	public void setTxtFldLNEvoporationLoss(VISTextField txtFldLNEvoporationLoss) {
		this.txtFldLNEvoporationLoss = txtFldLNEvoporationLoss;
	}

	/**
	 * @return the lblEvoporation
	 */
	public JLabel getLblEvoporation() {
		return lblEvoporation;
	}

	/**
	 * @param lblEvoporation the lblEvoporation to set
	 */
	public void setLblEvoporation(JLabel lblEvoporation) {
		this.lblEvoporation = lblEvoporation;
	}

	/**
	 * @return the txtFldLNVehicalNo
	 */
	public VISTextField getTxtFldLNVehicalNo() {
		return txtFldLNVehicalNo;
	}

	/**
	 * @param txtFldLNVehicalNo the txtFldLNVehicalNo to set
	 */
	public void setTxtFldLNVehicalNo(VISTextField txtFldLNVehicalNo) {
		this.txtFldLNVehicalNo = txtFldLNVehicalNo;
	}

	/**
	 * @return the txtFldLNFromStation
	 */
	public VISTextField getTxtFldLNFromStation() {
		return txtFldLNFromStation;
	}

	/**
	 * @param txtFldLNFromStation the txtFldLNFromStation to set
	 */
	public void setTxtFldLNFromStation(VISTextField txtFldLNFromStation) {
		this.txtFldLNFromStation = txtFldLNFromStation;
	}

	/**
	 * @return the txtFldLNConvertedLtrs
	 */
	public VISTextField getTxtFldLNConvertedLtrs() {
		return txtFldLNConvertedLtrs;
	}

	/**
	 * @param txtFldLNConvertedLtrs the txtFldLNConvertedLtrs to set
	 */
	public void setTxtFldLNConvertedLtrs(VISTextField txtFldLNConvertedLtrs) {
		this.txtFldLNConvertedLtrs = txtFldLNConvertedLtrs;
	}

	/**
	 * @return the lblConvertedLtrs
	 */
	public JLabel getLblConvertedLtrs() {
		return lblConvertedLtrs;
	}

	/**
	 * @param lblConvertedLtrs the lblConvertedLtrs to set
	 */
	public void setLblConvertedLtrs(JLabel lblConvertedLtrs) {
		this.lblConvertedLtrs = lblConvertedLtrs;
	}

	/**
	 * @return the lblDateOfReceipt
	 */
	public JLabel getLblDateOfReceipt() {
		return lblDateOfReceipt;
	}

	/**
	 * @param lblDateOfReceipt the lblDateOfReceipt to set
	 */
	public void setLblDateOfReceipt(JLabel lblDateOfReceipt) {
		this.lblDateOfReceipt = lblDateOfReceipt;
	}

	/**
	 * @return the pnlPLNPanel
	 */
	public JPanel getPnlPLNPanel() {
		return pnlPLNPanel;
	}

	/**
	 * @param pnlPLNPanel the pnlPLNPanel to set
	 */
	public void setPnlPLNPanel(JPanel pnlPLNPanel) {
		this.pnlPLNPanel = pnlPLNPanel;
	}

	/**
	 * @return the dtChoDateOfReceipt
	 */
	public JDateChooser getDtChoDateOfReceipt() {
		return dtChoDateOfReceipt;
	}

	/**
	 * @param dtChoDateOfReceipt the dtChoDateOfReceipt to set
	 */
	public void setDtChoDateOfReceipt(JDateChooser dtChoDateOfReceipt) {
		this.dtChoDateOfReceipt = dtChoDateOfReceipt;
	}

	/**
	 * @return the txtFldCode
	 */
	public VISTextField getTxtFldCode() {
		return txtFldCode;
	}

	/**
	 * @param txtFldCode the txtFldCode to set
	 */
	public void setTxtFldCode(VISTextField txtFldCode) {
		this.txtFldCode = txtFldCode;
	}

	/**
	 * @return the lblCode
	 */
	public JLabel getLblCode() {
		return lblCode;
	}

	/**
	 * @param lblCode the lblCode to set
	 */
	public void setLblCode(JLabel lblCode) {
		this.lblCode = lblCode;
	}

}//end class
